package xyz.scootaloo.mono.test.web

import org.ktorm.database.Database
import org.ktorm.dsl.count
import org.ktorm.dsl.from
import org.ktorm.dsl.select
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
import xyz.scootaloo.mono.base.lang.R
import xyz.scootaloo.mono.data.dao.auth.AuthUsers
import xyz.scootaloo.mono.data.service.AuthService

/**
 * @author flutterdash@qq.com
 * @since 2021/9/3 16:05
 */
@RestController
@RequestMapping("/test/table")
class DaoServiceTest {

    @Autowired lateinit var authService: AuthService

    @GetMapping("/records")
    fun testGetTableRecordCount(): R<Int> {
        return R.success(authService.getUserTableRecordCount())
    }
}
